<%@ Page Language="C#" AutoEventWireup="true" Theme="" Inherits="Swaf.Gui.AspNet2.BasePage" %>
<%@ Register Assembly="Swaf.Gui.AspNet2" Namespace="Swaf.Gui.AspNet2" TagPrefix="swf" %>

<html>
<head runat="server">
<script>
function startingUpload()
{
	uploadTools.style.visibility = "hidden";
	uploadStartedMsg.style.visibility = "visible";
}
function refreshDirectoryGrid()
{
window.top.adlBizProc.triggerEvent('ctl00_mainContent_dirs', 'bizObjSelected', window.top.document.getElementById('ctl00_mainContent_dirs_SelRowInfo').value);
window.top.toggleTabs('t','1','ta');
window.top.nitobi.getGrid('ctl00_mainContent_dirs').refresh();
}
</script>
</head>
<body runat="server" id="body">
	<form id="form1" runat="server">
	<div id="uploadStartedMsg" style="visibility:hidden" runat="server">Upload in progress.  Please wait...</div>
	<div id="uploadTools">
		<swf:BizProc ID="upload" runat="server" FactoryName="mediaUpload">
			<ParentBizProc id="adl" fieldName="keyName" dataId="dir" />
			<ParentBizProc id="settings" fieldName="id" dataId="cid" />
		</swf:BizProc>
		<swf:ActionButton ID="uploadBtn" runat="server" Text="Upload Now" ParentBizProcIds="upload.UpdateBizObj" ClientClick="startingUpload();" />
		<swf:ComplexBizObjListDisplay ID="files" runat="server"
			ReadOnlyTemplate="MediaCache.Gui.AspNet.HttpUploadOptionsDisplay"
			ParentBizProcIds="upload">
		</swf:ComplexBizObjListDisplay>	
	</div>
	</form>
</body>
<script runat="server">
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        if (Page.IsPostBack)
            ((HtmlGenericControl)Page.FindControl("body")).Attributes.Add("onload", "refreshDirectoryGrid()");
    }
</script>
</html>
